const http = require('node:http');

const server = http.createServer((req, res) => {
    res.writeHead(200, {
        'content-type': 'text/plain'
    });
    res.end('Hello, Node.js!');
});

let port = 3000;
server.listen(port, () => {
    console.log(`listening port ${port}`);
});